Skip to content

[NO-MERGE][CMPT-5391] feat(pipelines): add dr pipelines environment subcommand group - #6

Closed
sunny2get wants to merge 15 commits into
cmpt-5391/pipelines-schedulesfrom
cmpt-5391/pipelines-environments
Closed

[NO-MERGE][CMPT-5391] feat(pipelines): add dr pipelines environment subcommand group#6
sunny2get wants to merge 15 commits into
cmpt-5391/pipelines-schedulesfrom
cmpt-5391/pipelines-environments

Conversation

@sunny2get

Copy link
Copy Markdown
Owner

NO-MERGE — Requirements are still evolving. This PR is open for early review only.
Stack: PR 1 (base)PR 2 (crud)PR 3 (runs)PR 4 (inputs)PR 5 (schedules)PR 6 (this)

Summary

  • Adds dr pipelines environment create/list/update/delete — manage named, immutable-versioned pip-package environments that pipelines build against
  • Adds dr pipelines environment version delete — remove a specific older version without touching the parent
  • environment update appends a new immutable version; existing versions are unchanged
  • environment delete soft-deletes the latest active version, cascading to the parent if none remain active
  • Introduces cmd/pipelines/environment/envutil/ rendering helpers and internal/pipelines/environment.go

Stacked on: cmpt-5391/pipelines-schedules — diff here shows only the delta.

Test plan

  • go build ./...
  • go test ./cmd/pipelines/environment/... ./internal/pipelines/...
  • dr pipelines environment --help — shows create/list/update/delete/version
  • dr pipelines environment create --name ml-base --package numpy --help

🤖 Generated with Claude Code

@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 35404a1 to 94ce21f Compare May 25, 2026 17:17
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from e491849 to 00288a4 Compare May 25, 2026 17:17
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 94ce21f to 5ea6ed1 Compare May 25, 2026 17:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 00288a4 to 954c1fb Compare May 25, 2026 17:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 5ea6ed1 to 7eff4b1 Compare May 25, 2026 17:45
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 954c1fb to f5633d3 Compare May 25, 2026 17:45
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 7eff4b1 to 5a694f0 Compare May 25, 2026 18:06
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from f5633d3 to c47492a Compare May 25, 2026 18:08
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 5a694f0 to 3e310d8 Compare May 25, 2026 18:52
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch 2 times, most recently from 9a4a15d to ede20ce Compare May 25, 2026 20:33
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 3e310d8 to e834c10 Compare May 25, 2026 20:33
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from ede20ce to 9ae465b Compare May 27, 2026 15:57
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from e834c10 to 4e305a6 Compare May 27, 2026 15:57
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 9ae465b to 6ebbc47 Compare May 27, 2026 16:18
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch 2 times, most recently from 56c366b to 9d3527b Compare May 27, 2026 16:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 6ebbc47 to 801d53c Compare May 27, 2026 16:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 9d3527b to 1c8a8b8 Compare May 27, 2026 16:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 801d53c to 2a2bad9 Compare May 27, 2026 16:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 1c8a8b8 to 3e873ef Compare May 28, 2026 14:37
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 2a2bad9 to 0df4faf Compare May 28, 2026 14:37
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 3e873ef to 52f6f03 Compare May 28, 2026 14:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 0df4faf to 215a015 Compare May 28, 2026 14:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 52f6f03 to 3c81e39 Compare May 28, 2026 14:46
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch 2 times, most recently from 5d008a4 to e4649d2 Compare May 28, 2026 15:24
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 3c81e39 to 0f77eb6 Compare May 28, 2026 15:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from e4649d2 to 6c06118 Compare May 28, 2026 15:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 0f77eb6 to ccb22de Compare May 28, 2026 15:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 19da909 to 7e4887c Compare June 1, 2026 16:29
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from f5b80d1 to 8e95b5d Compare June 1, 2026 16:29
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 7e4887c to f2dc161 Compare June 1, 2026 17:11
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 8e95b5d to b06b4b5 Compare June 1, 2026 17:12
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from f2dc161 to f31a44b Compare June 1, 2026 17:54
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from b06b4b5 to 83d1339 Compare June 1, 2026 17:54
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from f31a44b to e6effed Compare June 2, 2026 20:44
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 83d1339 to 36886c1 Compare June 2, 2026 20:46
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from e6effed to 4f0e900 Compare June 3, 2026 16:16
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 48c2124 to 8cb28da Compare June 3, 2026 16:18
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 4f0e900 to 0ac9d44 Compare June 3, 2026 20:45
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch 2 times, most recently from bca501b to 8dcf9a2 Compare June 3, 2026 20:53
victorborshak and others added 14 commits June 4, 2026 18:35
Registers `dr pipelines environment` (create/list/update/delete +
`environment version delete`) backed by the /api/v2/pipelines/environments
endpoints. Extends docs and reference table accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mands

Apply sunny/pipelines versions of environment subcommand files and update
all import paths to use internal/pipeline (singular) after rename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n, limit defaults, version prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ate --name

Add cmd.MarkFlagRequired("name") so Cobra enforces the flag before
RunE (consistent with version/del which already marks --environment
required). Update TestCmd_RejectsMissingName to match Cobra's error
format ("name" instead of "--name").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-environments branch from 8dcf9a2 to 3989bec Compare June 5, 2026 18:27
- internal/pipeline/environment.go: correct ListEnvironments comment
  ("bare JSON array" → "DataPage envelope")
- cmd/pipeline/environment/create/cmd.go: fix example --packages → --package
- docs/commands/pipelines-reference.md: fix --packages → --package in create example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get sunny2get closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants